package cn.topevery.garden.wapi.controller;

import cn.topevery.garden.dal.logic.UpmsLogic;
import hw.topevery.framework.web.JsonResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/auth")
@Api(tags = "统一登录")
public class UpmsController extends BaseController {

    @Autowired
    private UpmsLogic upmsLogic;

    @ApiOperation("统一认证登录")
    @GetMapping("/loginUpms")
    public JsonResult<?> loginUpms(@RequestParam(name = "token") String token) {
        return upmsLogic.loginUpm(token);
    }
}
